<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/bizappproject/purchase_info/Purchase_Info.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/bizappproject/purchase_info/Purchase_Info.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Purchase_Info",
        setup() {
            const table = ref({
                key: "Id",
                footer: "Foots",
                cnName: "三地采购信息查看",
                name: "purchase_info/Purchase_Info",
                newTabEdit: false,
                url: "/Purchase_Info/",
                sortName: "Id"
            });
            const editFormFields = ref({"Cate1":"","Cate2":"","UserId":"","PoDate":"","Name":"","PartnerId":"","PriceUint":"","ProductQty":"","BasePrice":"","PriceSubtotal":"","Total":"","Spec":"","Remarks":""});
            const editFormOptions = ref([[{"title":"采购物料分类一级","field":"Cate1"},
                               {"title":"采购物料分类二级","field":"Cate2"}],
                              [{"title":"合同负责人","field":"UserId"},
                               {"title":"合同日期","field":"PoDate"}],
                              [{"title":"供应商","field":"PartnerId"},
                               {"title":"产品","field":"Name"}],
                              [{"title":"数量","field":"ProductQty","type":"decimal"},
                               {"title":"单价（元）","field":"PriceUint","type":"decimal"}],
                              [{"title":"基准价格（元）","field":"BasePrice","type":"decimal"},
                               {"title":"合计（不含税）（元）","field":"PriceSubtotal","type":"decimal"}],
                              [{"title":"合计（元）","field":"Total","type":"decimal"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"},
                               {"title":"规格型号","field":"Spec"}]]);
            const searchFormFields = ref({"Name":"","Spec":"","PriceUint":[null,null],"BasePrice":[null,null],"ProductQty":"","PriceSubtotal":[null,null],"Total":[null,null],"Cate1":"","Cate2":"","UserId":"","PoDate":"","PartnerId":"","Location":""});
            const searchFormOptions = ref([[{"title":"产品","field":"Name","type":"like"},{"title":"供应商","field":"PartnerId","type":"like"},{"title":"数量","field":"ProductQty","type":"like"},{"title":"单价（元）","field":"PriceUint","type":"range"}],[{"title":"合同日期","field":"PoDate","type":"like"},{"title":"合同负责人","field":"UserId","type":"like"},{"title":"采购物料分类二级","field":"Cate2","type":"like"},{"title":"采购物料分类一级","field":"Cate1","type":"like"}],[{"title":"基准价格（元）","field":"BasePrice","type":"range"},{"title":"合计（不含税）（元）","field":"PriceSubtotal","type":"range"},{"title":"合计（元）","field":"Total","type":"range"},{"title":"采购地","field":"Location","type":"like"},{"title":"规格型号","field":"Spec","type":"like"}]]);
            const columns = ref([{field:"Name",title:"产品",type:"string",sort:true,width:150,fixed:true,showOverflowTooltip:true,align:"left"},
                       {field:"Spec",title:"规格型号",type:"string",sort:true,width:120,showOverflowTooltip:true,align:"left"},
                       {field:"PriceUint",title:"单价（元）",type:"decimal",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"BasePrice",title:"基准价格（元）",type:"decimal",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ProductQty",title:"数量",type:"decimal",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Product_uom",title:"单位",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"PriceSubtotal",title:"合计（不含税）（元）",type:"decimal",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Id",title:"键",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Total",title:"合计（元）",type:"decimal",sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Cate1",title:"采购物料分类一级",type:"string",sort:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"Cate2",title:"采购物料分类二级",type:"string",sort:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"UserId",title:"合同负责人",type:"string",sort:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"PoDate",title:"合同日期",type:"string",sort:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"PartnerId",title:"供应商",type:"string",sort:true,width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效(0:否,1:是)",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建人ID",type:"bigint",width:80,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人名",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改人ID",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人名",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Location",title:"采购地",type:"string",sort:true,width:120,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
